import React from 'react'

function Modal(props) {
  console.log('Modal组件渲染了')
  const { isShowModal, title, content, closeModal } = props
  return (
    <div className={`modal ${isShowModal && 'isShowModal'}`}>
      <div className="modalTitle">
        {title}
        <span className="close" onClick={closeModal}>X</span>
      </div>
      <div className="modalContent">
        {content}
      </div>
    </div>
  )
}

export default React.memo(Modal)